#!/bin/bash
# Needs Argument $1 = Version String

echo Copying release files to: ../bin/deploy/unix
echo "curdir: " $PWD
curdir=$PWD

debug="../bin/debug"
release="../bin/release"
deploy="../bin/deploy/unix"

if [ ! -d $deploy ]; then
    echo "Creating " $deploy
    mkdir $deploy
    if [ ! -d $deploy/templates ]; then
        echo "Creating " $deploy/templates
	mkdir $deploy/templates
    fi
fi

cp $release/PlacesParser $deploy/
cp $PWD/PlacesParser_en.qm $deploy/
cp $PWD/../templates/* $deploy/templates/

echo Creating tar.bz2 Archive
cd $deploy
tar cvjf PlacesParser_$1.tar.bz2 *
cd $curdir
